package rlex.classes;
import java.io.*;
import java.util.*;
public class teste {
    private static final Exception Exception = new Exception() ;
	public static Vector voc,lex;
	static String[] base_donee={"boleen","si","faire","tantque","sinon","entier","chaine","lettre","pour","de","a","finpour","fintanque","finfaire","finsi"};
	static String[] type={"entier","chaine","lettre","boleen"};
	public static int ind=0;
    public static String tmp;
    public teste(){
    	
    }
    public static  boolean estchifre(Character c){
    	if (c.equals('1')) return true;
    	if (c.equals('2')) return true;
    	if (c.equals('3')) return true;
    	if (c.equals('4')) return true;
    	if (c.equals('5')) return true;
    	if (c.equals('6')) return true;
    	if (c.equals('7')) return true;
    	if (c.equals('8')) return true;
    	if (c.equals('9')) return true;
    	if (c.equals('0')) return true;
    	return false;
    }
   
    public static void main(String[] args) {
    	
    	
    	ind=0;
      try{
    		System.out.println("du code ");
      		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
       		String g=br.readLine();
       		//System.out.println("vous aver taper :"+g);
       		try{
       		lire(g);
       		}
       		catch(Exception e){
       			
       		}
       		afficher(voc);
       		}catch(IOException e){
       			System.err.println("error 1");
       		}

    	if(est_type("entier")) 	System.out.println("vOK:");
    	else
    		System.out.println("nOK:");
    	
       
    }
    public static void afficher(Vector d) 
    {
    	for(int i=0;i<d.size();i++)
    	System.out.println("|"+ d.get(i)+"|");
    }
    public static  void lire(String s) throws Exception{
    	System.out.println("*** s:"+s);
    	if(s.equals(null)) throw Exception;
    	voc=new Vector();
    	lex=new Vector();
    	for(ind=0;ind<s.length();ind++){
    	Character c=s.charAt(ind);
    	if(c.equals(' ')||c.equals('\n')||c.equals('\t')) {continue;}
    	if(c.equals(';')) {voc.add(";");lex.add("ptvir");continue;}
    	if(c.equals(',')) {voc.add(",");lex.add("vir");continue;}
    	if(c.equals('.')) {voc.add(".");lex.add("pt");continue;}
    	if(c.equals('=')){
    		c=s.charAt(ind+1);
    		 if(c.equals('=')){
    		 	ind++;
    		 	voc.add("==");lex.add("comp");
    		 	continue;
    		 }
    		 else {voc.add("=");lex.add("aff");
    		 continue; }
    }
    		
        		if(Character.isLetter(c)) { tmp="";
    	
    		while(Character.isLetter(c)){
    			
    		//
    			tmp+=c;
    		ind++;
    			c=s.charAt(ind);
    	
     }   		
    		voc.add(tmp);
    		if(est_mot_cle(tmp))
    		lex.add("mot_cle");
    		else
    			lex.add("identif");
    			
    		ind--;
    //	System.out.println("chifre" + tmp);	
    		continue;}		
    		
    		
    if(teste.estchifre(c)) { tmp="";
    		do{
    			
    			tmp+=c;
    			ind++;
    			c=s.charAt(ind);
    		}while((teste.estchifre(c)));
    		ind--;
    		voc.add(tmp);
    		lex.add("nombnre");
    //	System.out.println("chifre" + tmp);	
    		continue;}
    		

    voc.add(""+c);
    lex.add("ereur");
    }
    
    }
    	
    public static boolean est_mot_cle(String f){
    	for(int i=0;i<base_donee.length;i++)
    		if(base_donee[i].equals(f)) return true;
    	return false;
    }
    public static boolean est_type(String f){
    	for(int i=0;i<type.length;i++)
    		if(type[i].equals(f)) return true;
    	return false;
    }

    
    }
